package io.renren.service.impl;


import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.R;
import io.renren.dao.AdDao;
import io.renren.entity.AdEntity;
import io.renren.service.AdService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("adService")
public class AdServiceImpl extends ServiceImpl<AdDao, AdEntity> implements AdService {


    /***
     * 获取广告
     * @param adPositionId 广告位置
     * @return R
     */
    @Override
    public R getAd(Integer adPositionId) {
        List<Map<String, Object>> nideshop = baseMapper.getAd(adPositionId);
        return R.ok(nideshop);
    }
}
